
import java.io.IOException;
import java.net.*;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
 *
 * @author Mario
 */
public class cPing {
    public boolean hacerping(String tmp){
        try {
            InetAddress address = InetAddress.getByName(tmp);
            boolean reachable = address.isReachable(5000);
            return reachable;
        } catch (IOException ex) {
            Logger.getLogger(cPing.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }
}
